﻿{#template MAIN}
<table id="gridProgram" cellpadding="5" cellspacing="1" name="gridProgram" class="grid">
    <thead class="sub">
        <tr>
            <th>
            </th>
            <th>
                Date
            </th>
            <th>
                Activity
            </th>
            <th>
                Service
            </th>
            <th>
                Provider
            </th>
            <th style="display: none">
                <!--Package Cost-->
            </th>
            <th style="display: none">
                <!--Unit Cost-->
            </th>
            <th>
                Currency
            </th>
            <th style="display: none">
                <!--Rate-->
            </th>
            <th>
                Amount (VND)
            </th>
            <th>
                Status
            </th>
            <th>
                Type
            </th>
            <th style="display: none">
                <!--Number of pax/cabin(s)/other(s)-->
            </th>
            <th style="display: none">
                <!--Number of night(s)-->
            </th>
            <th style="display: none">
                <!--Other Uom-->
            </th>
            <th style="display: none">
                <!--Pax in package-->
            </th>
            <th style="display: none">
                <!--Service ID-->
            </th>
            <th style="display: none">
                <!--Provider ID-->
            </th>
            <th style="display: none">
                <!--Service Type ID-->
            </th>
            <th style="display: none">
                <!--Status ID-->
            </th>
            <th style="display: none">
                <!--Currency ID-->
            </th>
            <th style="display: none">
                <!--HotelAddress-->
            </th>
            <th style="display: none">
                <!--Description-->
            </th>
            <th style="display: none">
                <!--ItemCode-->
            </th>
            <th>
                Service Date
            </th>
            <th width="48px">
                <a class="btnNew">Program</a>
            </th>
        </tr>
    </thead>
    <tbody>
        {#foreach $T.List as service}
        <tr id="{$T.service.ServiceID}" class="{#cycle values=['','evenRow']}">
            {#include ROW root=$T.service}
            <td>
                <a serviceid='{$T.service.ServiceID}' class="btnEdit new">Edit</a>&nbsp;|&nbsp;<a serviceid="{$T.service.ServiceID}"
                    class="btnDelete new">Remove</a>
            </td>
        </tr>
        {#/foreach}
    </tbody>
    <tfoot>
        <tr style="font-weight: bold;">
            <th colspan="2"><a href="javascript:void(0)" style="color: #111" onclick="moveUp()">Move Up</a></th>
            <th><a href="javascript:void(0)" style="color: #111" onclick="moveDown()">Move Down</a></th>
            <th colspan="6">
                Total:
                <div class="subTotalService">
                </div>
            </th>
            <th colspan="2">
                <a class="btnIncrease" style="color: #111">Increase Date</a>
            </th>
        </tr>
    </tfoot>
</table>
{#/template MAIN} {#template ROW}
<td>
    <input type="checkbox" class="chkService" disabled="disabled" />
</td>
<td>
    {formatJSONDate($T.Date)}
</td>
<td>
    {$.trim($T.Program)}
</td>
<td>
    {#if $T.Service != null && $T.Service != ''}{$T.Service.ServiceName}{#/if}
</td>
<td>
    {#if $T.Provider != null && $T.Provider != ''}{$T.Provider.ProviderName}{#/if}
</td>
<td style="display: none">
    {$T.PackagePrice}
</td>
<td style="display: none">
    {$T.UnitPrice}
</td>
<td>
    {$T.CurrencyN}
</td>
<td style="display: none">
    {$T.Rate}
</td>
<td style="text-align: right">
    {formatCurrency($T.Amount)}
</td>
<td>
    {$T.StatusN}
</td>
<td>
    {$T.ServiceTypeN}
</td>
<td style="display: none">
    {$T.Pax}
</td>
<td style="display: none">
    {$T.Nights}
</td>
<td style="display: none">
    {$T.OtherUom}
</td>
<td style="display: none">
    {$T.NumInPackage}
</td>
<td style="display: none">
    {$.trim($T.ServiceID)}
</td>
<td style="display: none">
    {$.trim($T.ProviderID)}
</td>
<td style="display: none">
    {$T.ServiceType}
</td>
<td style="display: none">
    {$T.Status}
</td>
<td style="display: none">
    {$T.Currency}
</td>
<td style="display: none">
    {$T.HotelPickupAddress}
</td>
<td style="display: none">
    {$T.Description}
</td>
<td style="display: none">
    {$T.ItemCode}
</td>
<td>
    {#if $T.ServiceDate != null && $T.ServiceDate != ''}{formatJSONDate($T.ServiceDate)}{#/if}
</td>
{#/template ROW}